import {defineStore} from "pinia";
import {ref} from "vue";

export const Tokens = defineStore('state', () => {
    const token = ref<string>('')
    // 登录状态
    // const isLogin = ref(false);
    // const userInfo = ref(null)
    // 用户信息
    function getToken(): string{
        return token.value
    }

    function setToken(value: any) {
        token.value = value
    }

    function removeToken() {
        token.value = ''
        return token.value
    }

const isLogIn=false;

    return {token, setToken, getToken,removeToken,isLogIn}
});